#ifndef _DSIMPLEARITHMETIC_H
#define _DSIMPLEARITHMETIC_H

//==============================================================================
//
// DSimpleArithmetic - the protocol for classes that implement a simple arithmetic
//
//               Copyright (C) 2005  Dick van Oudheusden
//  
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free
// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
//==============================================================================
// 
//  $Date: 2005-03-29 18:22:58 $ $Revision: 1.1 $
//
//==============================================================================


//
// The DSimpleArithmetic protocol specifies methods for classes that can perform 
// simple arithmetic: addition, subtraction, multiplication and division.
// 


@protocol DSimpleArithmetic

//
// Add with another object
//
// @param other    the other object
//
// @return the object
//
- (id <DSimpleArithmetic>) add :(id <DSimpleArithmetic>) other;

//
// Add two object and store the result in this object
//
// @param src1     the first object
// @param src2     the second object
//
// @return the object
//
- (id <DSimpleArithmetic>) add :(id <DSimpleArithmetic>) src1 :(id <DSimpleArithmetic>) src2;

//
// Subract with another object
//
// @param other     the other object
//
// @return the object
//
- (id <DSimpleArithmetic>) sub :(id <DSimpleArithmetic>) other;

//
// Subract two objects and store the result in this object
//
// @param src1      the first object
// @param src2      the second object
//
// @return the object
//
- (id <DSimpleArithmetic>) sub :(id <DSimpleArithmetic>) src1 :(id <DSimpleArithmetic>) src2;

//
// Multiply with another object
//
// @param other    the other object
//
// @return the object
//
- (id <DSimpleArithmetic>) mul :(id <DSimpleArithmetic>) other;

//
// Multiply two objects and store the result in this object
//
// @param src1    the first object
// @param src2    the second object
//
// @return the object
//
- (id <DSimpleArithmetic>) mul :(id <DSimpleArithmetic>) src1 :(id <DSimpleArithmetic>) src2;

//
// Divide with another object
//
// @param other    the divider object
//
// @return the object
//
- (id <DSimpleArithmetic>) div :(id <DSimpleArithmetic>) other;

//
// Divide two object and store the result in this object
//
// @param src1    the number object
// @param src2    the divider object
//
// @return the object
//
- (id <DSimpleArithmetic>) div :(id <DSimpleArithmetic>) src1 :(id <DSimpleArithmetic>) src2;

@end

#endif

